<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>信息推送触发关键字列表定义</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <link href="../../assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="../../assets/css/font-awesome.min.css" />

        <link rel="stylesheet" href="../../assets/css/ace.min.css" />
        <link rel="stylesheet" href="../../assets/css/ace-rtl.min.css" />
        <link rel="stylesheet" href="../../assets/css/ace-skins.min.css" />

        <!--[if lte IE 8]>
          <link rel="stylesheet" href="../../assets/css/ace-ie.min.css" />
        <![endif]-->

        <script src="../../assets/js/ace-extra.min.js"></script>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

        <!--[if lt IE 9]>
        <script src="../../assets/js/html5shiv.js"></script>
        <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->

        <style>
            @font-face { 
                font-family: "Open Sans"; /*这里是说明调用来的字体名字*/ 
                src: url('../../assets/font/OpenSans-Regular.ttf'); /*这里是字体文件路径*/ 
            } 
        </style>
    </head>

    <body>

        <div class="main-container">
            <div class="page-content">

                <div class="row">
                    <div class="col-sm-12">
                        <h4 style="padding-left:20px; margin-top: 20px;" class='header smaller lighter blue'>信息推送触发关键字列表定义</h4>
                        <form class="form-horizontal" role="form" id="form">
                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 策略名称 </label>
                                <div class="col-sm-9">
                                    <input type="text" class="input-medium policy_desc" placeholder="" id="" name="policy-name" required>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 触发关键字列表ID </label>
                                <div class="col-sm-9">
                                    <input type="text" class="col-xs-1" placeholder="" id="Trigger_KWListID" name="Trigger_KWListID" required>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 关键字名称 </label>

                                <div class="col-sm-9">
                                    <span class="help-block">填写格式为：手机，一行填写一个关键字名称.如多个关键字是“与”的关系，则必须作为一个关键字同时出现。如“苹果 手机”</span>
                                    <textarea id="KWName-textarea" name="KWName-textarea" class="form-control input-xxlarge" style="height: 260px; resize:none;" required></textarea>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-md-offset-3 col-md-9 col-sm-offset-3 col-sm-9">
                                    <div class="controls">
                                        <button type="button" class="btn btn-sm btn-danger up">
                                            <i class="icon-arrow-left"></i>
                                            查看上一个版本
                                        </button>
                                        &nbsp; &nbsp; &nbsp;
                                        <button type="button" class="btn btn-sm btn-danger next" disabled="">
                                            <i class="icon-arrow-right"></i>
                                            查看下一个版本
                                        </button>
                                        &nbsp; &nbsp; &nbsp;
                                        <button type="button" class="btn btn-sm btn-danger" onclick="previous();">
                                            <i class="icon-undo"></i>
                                            返回
                                        </button>
                                    </div>
                                </div>
                            </div>

                        </form>

                    </div>

                </div>

            </div>

        </div>

        <!-- basic scripts -->

        <!--[if !IE]> -->

        <script src="../../assets/js/jquery.js"></script>

        <!-- <![endif]-->

        <!--[if IE]>
        <script type="text/javascript">
         window.jQuery || document.write("<script src='../../assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
        </script>
        <![endif]-->

        <script src="../../assets/js/bootstrap.min.js"></script>

        <script src="../../assets/js/jquery.validate.js"></script>

        <!--[if lte IE 8]>
          <script src="../../assets/js/excanvas.min.js"></script>
        <![endif]-->

        <script src="../../assets/js/ace-elements.min.js"></script>
        <script src="../../assets/js/ace.min.js"></script>
        <script src="../../assets/js/plugin/menu/menu.js"></script>
        <script src="../../assets/js/Base64.js"></script>
        <script src="logic.js"></script>

        <script type="text/javascript">
                                            var base64 = new Base64();
                                            var type = getQueryString("type");
                                            var DepotID = getQueryString("DepotID");
                                            var DepotName = getQueryString("DepotName");
                                            DepotName = base64.decode(DepotName);
                                            var id = getQueryString("id");
                                            var policyArray, policyAmount, actualQuantity;
                                            $(function() {
                                                getAllPolicy();
                                                //初始化数据
                                                actualQuantity = policyAmount - 1;
                                                show_oldPolicy(policyArray, actualQuantity);
                                                if (actualQuantity == 0) {
                                                    $(".up").attr("disabled", "");
                                                }
                                                if (actualQuantity == (policyAmount - 1)) {
                                                    $(".next").attr("disabled", "");
                                                }
                                                $(".up").click(function() {
                                                    actualQuantity = actualQuantity - 1;
                                                    show_oldPolicy(policyArray, actualQuantity);
                                                    $(".next").removeAttr("disabled");
                                                    if (actualQuantity == 0) {
                                                        $(".up").attr("disabled", "");
                                                    }
                                                });
                                                $(".next").click(function() {
                                                    actualQuantity = actualQuantity + 1;
                                                    show_oldPolicy(policyArray, actualQuantity);
                                                    $(".up").removeAttr("disabled");
                                                    if (actualQuantity == (policyAmount - 1)) {
                                                        $(".next").attr("disabled", "");
                                                    }
                                                });
                                            })
        </script>
    </body>
</html>
